import { T_srv, Tsrv, ifs, ts, tvs, vue } from '@/services';
import { I_cmd, T_cmd } from './command';
import { N_BoilerMonitor } from './type';

// 点位未导入系统，后续补充
// 锅炉点位

const steamForm = (): N_BoilerMonitor.SteamForm => ({
  conductivityUpper: { value: 1, code: 'myBoiler019' },
  conductivity: { value: 1, code: 'myBoiler022' },
  manualWaterTime: { value: 1, code: 'myBoiler020' },
  manualWaterTimer: { value: 1, code: 'myBoiler021' },
  autoSwitch: { value: false, code: 'my792' },
  valveSwitch: { value: false, code: 'my791' },
  returnWaterSwitch: { value: false, code: 'my851' }
});

const boilers = (): N_BoilerMonitor.BoilerState[] => [
  {
    communicationStatus: { value: true, code: 'myBoiler001' },
    status: { value: 0, code: 'myBoiler007' },
    controlButtons: {
      start: { value: 100, code: 'myBoiler013' },
      stop: { value: 100, code: 'myBoiler013' },
      reset: { value: 100, code: 'myBoiler013' },
      mute: { value: 100, code: 'myBoiler013' }
    },
    feedPump: {
      status: { value: 100, code: 'myBoiler013' },
      mode: { value: 100, code: 'myBoiler013' }
    },
    sensors: {
      lowLimitWaterLevel: { value: false, code: 'myBoiler023' },
      lowWaterLevel: { value: false, code: 'myBoiler029' },
      highWaterLevel: { value: false, code: 'myBoiler035' },
      highWaterAlarm: { value: false, code: 'myBoiler041' },
      wallOverTemp: { value: false, code: 'myBoiler047' },
      startStopControl: { value: false, code: 'myBoiler053' },
      overPressureAlarm: { value: false, code: 'myBoiler059' }
    }
  },
  {
    communicationStatus: { value: true, code: 'myBoiler002' },
    status: { value: 0, code: 'myBoiler008' },
    controlButtons: {
      start: { value: 100, code: 'myBoiler014' },
      stop: { value: 100, code: 'myBoiler014' },
      reset: { value: 100, code: 'myBoiler014' },
      mute: { value: 100, code: 'myBoiler014' }
    },
    feedPump: {
      status: { value: 100, code: 'myBoiler014' },
      mode: { value: 100, code: 'myBoiler014' }
    },
    sensors: {
      lowLimitWaterLevel: { value: false, code: 'myBoiler024' },
      lowWaterLevel: { value: false, code: 'myBoiler030' },
      highWaterLevel: { value: false, code: 'myBoiler036' },
      highWaterAlarm: { value: false, code: 'myBoiler042' },
      wallOverTemp: { value: false, code: 'myBoiler048' },
      startStopControl: { value: false, code: 'myBoiler054' },
      overPressureAlarm: { value: false, code: 'myBoiler060' }
    }
  },
  {
    communicationStatus: { value: true, code: 'myBoiler003' },
    status: { value: 0, code: 'myBoiler009' },
    controlButtons: {
      start: { value: 100, code: 'myBoiler015' },
      stop: { value: 100, code: 'myBoiler015' },
      reset: { value: 100, code: 'myBoiler015' },
      mute: { value: 100, code: 'myBoiler015' }
    },
    feedPump: {
      status: { value: 100, code: 'myBoiler015' },
      mode: { value: 100, code: 'myBoiler015' }
    },
    sensors: {
      lowLimitWaterLevel: { value: false, code: 'myBoiler025' },
      lowWaterLevel: { value: false, code: 'myBoiler031' },
      highWaterLevel: { value: false, code: 'myBoiler037' },
      highWaterAlarm: { value: false, code: 'myBoiler043' },
      wallOverTemp: { value: false, code: 'myBoiler049' },
      startStopControl: { value: false, code: 'myBoiler055' },
      overPressureAlarm: { value: false, code: 'myBoiler061' }
    }
  },
  {
    communicationStatus: { value: true, code: 'myBoiler004' },
    status: { value: 0, code: 'myBoiler010' },
    controlButtons: {
      start: { value: 100, code: 'myBoiler016' },
      stop: { value: 100, code: 'myBoiler016' },
      reset: { value: 100, code: 'myBoiler016' },
      mute: { value: 100, code: 'myBoiler016' }
    },
    feedPump: {
      status: { value: 100, code: 'myBoiler016' },
      mode: { value: 100, code: 'myBoiler016' }
    },
    sensors: {
      lowLimitWaterLevel: { value: false, code: 'myBoiler026' },
      lowWaterLevel: { value: false, code: 'myBoiler032' },
      highWaterLevel: { value: false, code: 'myBoiler038' },
      highWaterAlarm: { value: false, code: 'myBoiler044' },
      wallOverTemp: { value: false, code: 'myBoiler050' },
      startStopControl: { value: false, code: 'myBoiler056' },
      overPressureAlarm: { value: false, code: 'myBoiler062' }
    }
  },
  {
    communicationStatus: { value: true, code: 'myBoiler005' },
    status: { value: 0, code: 'myBoiler011' },
    controlButtons: {
      start: { value: 100, code: 'myBoiler017' },
      stop: { value: 100, code: 'myBoiler017' },
      reset: { value: 100, code: 'myBoiler017' },
      mute: { value: 100, code: 'myBoiler017' }
    },
    feedPump: {
      status: { value: 100, code: 'myBoiler017' },
      mode: { value: 100, code: 'myBoiler017' }
    },
    sensors: {
      lowLimitWaterLevel: { value: false, code: 'myBoiler027' },
      lowWaterLevel: { value: false, code: 'myBoiler033' },
      highWaterLevel: { value: false, code: 'myBoiler039' },
      highWaterAlarm: { value: false, code: 'myBoiler045' },
      wallOverTemp: { value: false, code: 'myBoiler051' },
      startStopControl: { value: false, code: 'myBoiler057' },
      overPressureAlarm: { value: false, code: 'myBoiler063' }
    }
  },
  {
    communicationStatus: { value: true, code: 'myBoiler006' },
    status: { value: 0, code: 'myBoiler012' },
    controlButtons: {
      start: { value: false, code: 'myBoiler018' },
      stop: { value: false, code: 'myBoiler018' },
      reset: { value: false, code: 'myBoiler018' },
      mute: { value: false, code: 'myBoiler018' }
    },
    feedPump: {
      status: { value: false, code: 'myBoiler018' },
      mode: { value: false, code: 'myBoiler018' }
    },
    sensors: {
      lowLimitWaterLevel: { value: false, code: 'myBoiler028' },
      lowWaterLevel: { value: false, code: 'myBoiler034' },
      highWaterLevel: { value: false, code: 'myBoiler040' },
      highWaterAlarm: { value: false, code: 'myBoiler046' },
      wallOverTemp: { value: false, code: 'myBoiler052' },
      startStopControl: { value: false, code: 'myBoiler058' },
      overPressureAlarm: { value: false, code: 'myBoiler064' }
    }
  }
];

export {
  I_cmd,
  N_BoilerMonitor,
  T_cmd,
  T_srv,
  Tsrv,
  boilers,
  ifs,
  steamForm,
  ts,
  tvs,
  vue
};
